﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Ec.NETCoreFramework.Common.Core
{
	public class JobDto
	{
		/// <summary>
		/// 定时任务的名称
		/// </summary>
		public string Name { get; set; }
		/// <summary>
		/// 定时作业的组名称
		/// </summary>
		public string GroupName { get; set; }
		/// <summary>
		/// 描述,自己加,如果后面我们自己做管理页面,我展示
		/// </summary>
		public string Description { get; set; }
		/// <summary>
		///  定时的时间表达式
		/// </summary>
		public string CronSchedule { get; set; }
		/// <summary>
		/// 定时任务需要传的值
		/// </summary>
		public Hashtable Data { get; set; }

		/// <summary>
		///  有参构造
		/// </summary>
		/// <param name="name"></param>
		/// <param name="groupName"></param>
		/// <param name="description"></param>
		/// <param name="cronSchedule"></param>
		/// <param name="hashtable"></param>
		public JobDto(string name, string groupName, string description, string cronSchedule, Hashtable hashtable)
		{
			Name = name;
			GroupName = groupName;
			Description = description;
			CronSchedule = cronSchedule;
			Data = hashtable;
		}

	}
	public abstract class JobBase
	{
		/// <summary>
		///  接口里面也能写具体的方法
		/// </summary>

		//这个时间,是dll时间,为了后期修改任务做的事情
		public DateTime FileInfoLastTime { get; set; }

		public abstract JobDto InitJobModel();


	}
}
